<template>
  <div>
    <div class="header">
      {{$route.meta.title}}
      <span v-if="$route.meta.isshow1" @click="dl">登录</span>
      <span v-if="$route.meta.isshow" @click="zc">注册</span>
    </div>
    <router-view class="con"></router-view>
  </div>
</template>
<script>
export default {
  methods: {
    dl() {
      this.$router.push("/login");
    },
    zc() {
      this.$router.push("/register");
    },
  },
};
</script>
<style scoepd>
.header {
  z-index: 1;
  width: 100vw;
  height: 0.8rem;
  background: #ff4400;
  color: #fff;
  text-align: center;
  line-height: 0.8rem;
  position: fixed;
  left: 0;
  top: 0;
  font-size: 0.4rem;
}
.header span {
  position: absolute;
  right: 0.3rem;
}
.con {
  padding-top: 0.8rem;
}
</style>